#ifndef KENOSQL_H
#define KENOSQL_H

typedef unsigned char KenoGameID[8];

//
// All money values are in cents (100 == $1, 25 == $.25, 1 == $.01)
//
// IMPORTANT:  Access to this class is NOT thread-safe.  That's handled at
//			   the next level up (with calls to lock()/unlock()).
//

typedef char PID[8 + 1];

class KenoSQL 
{
	public:
		KenoSQL(char* DBHost, char* DBName, char* DBPassword);

		bool8 createGame(PID, bool8 forMoney, KenoGameID,
			int32 bet, int32* balance);

		bool8 gameDone(PID, bool8 forMoney, KenoGameID, int32 outcome,
			int32 balanceAdjust, int32* balance);

	protected:
		void outcomeToDB(uint8, char*);
		void DBtoKenoGameID(const char *, KenoGameID);
		void KenoGameIDtoDB(KenoGameID, char*);
};

#endif
